package com.littcore.saap.message.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


/**
 * 用户消息按模块统计数.
 * 
 * <pre><b>描述：</b>
 *     
 * </pre>
 * 
 * <pre><b>修改记录：</b>
 *    
 * </pre>
 * 
 * @author <a href="mailto:littcai@hotmail.com">蔡源</a>
 * @since 2015年11月4日
 * @version 1.0
 */
public class UserMessageStatVo implements Serializable {
  
  /** The Constant serialVersionUID. */
  private static final long serialVersionUID = 1L;

  /** 模块编号. */
  private String moduleCode;
  
  /** 未读消息数. */
  private int unreadCount; 
  
  /** 最近消息时间. */
  private Date lastDatetime;
  
  /** 用于存放国际化内容（用于呈现）. */
  private Map<String, String> i18n;
     
  /**
   * @param moduleCode
   * @param unreadCount
   */
  public UserMessageStatVo(String moduleCode, int unreadCount, Date lastDatetime)
  {
    this.moduleCode = moduleCode;
    this.unreadCount = unreadCount;
    this.lastDatetime = lastDatetime;
  }
  
  /**
   * 添加国际化内容.
   *
   * @param key the key
   * @param value the value
   * @return the user message stat vo
   */
  public UserMessageStatVo addI18n(String key, String value)
  {
    if(i18n==null)
      i18n = new HashMap<String, String>();
    i18n.put(key, value);
    return this;
  }

  /**
   * @return the moduleCode
   */
  public String getModuleCode()
  {
    return moduleCode;
  }

  
  /**
   * @param moduleCode the moduleCode to set
   */
  public void setModuleCode(String moduleCode)
  {
    this.moduleCode = moduleCode;
  }

  
  /**
   * @return the unreadCount
   */
  public int getUnreadCount()
  {
    return unreadCount;
  }

  
  /**
   * @param unreadCount the unreadCount to set
   */
  public void setUnreadCount(int unreadCount)
  {
    this.unreadCount = unreadCount;
  }

  
  /**
   * @return the lastDatetime
   */
  public Date getLastDatetime()
  {
    return lastDatetime;
  }

  
  /**
   * @param lastDatetime the lastDatetime to set
   */
  public void setLastDatetime(Date lastDatetime)
  {
    this.lastDatetime = lastDatetime;
  }
  
  /**
   * @return the i18n
   */
  public Map<String, String> getI18n()
  {
    return i18n;
  }

}
